1. Field of the Invention
The present invention relates to a method and an apparatus for designing a creative free-form surface in three-dimensional space and also for designing a free-form surface from a map indicating altitude or density and from coordinates of a three-dimensional object.
2. Description of the Prior Art
A free-form surface is designed for reproducing or modifying a curved surface existing in natural environment, or a curved surface obtained by experience, on computer, and also for designing a curved surface of buildings and industrial products.
In the past, a Bezier curved surface, a B-spline curved surface, a NURBS curved surface, a Gregory curved surface, etc. have been used for designing a curved surface on a computer. For example, the Bezier curved surface is expressed by the equation (1):                               S          ⁡                      (                          u              ,              v                        )                          =                              ∑                          i              =              0                        n                    ⁢                      xe2x80x83                    ⁢                                    ∑                              j                =                0                            m                        ⁢                          xe2x80x83                        ⁢                                                            B                  i                  n                                ⁡                                  (                  u                  )                                            ⁢                                                B                  j                  m                                ⁡                                  (                  v                  )                                            ⁢                              P                ij                                                                        (        1        )            
Vector S(u,v) is a position vector of a point on curved surface in three-dimensional rectangular coordinate system xyz, i.e.:
S(u,v)={x(u,v),y(u,v),z(u,v)}xe2x80x83xe2x80x83(2)
where u and v are real parameters, which change within the range of 0xe2x89xa6uxe2x89xa61 and 0xe2x89xa6vxe2x89xa61 respectively.
Vector Pij (i=0, . . . ,n; j=0, . . . , m) is a position vector of a control point of Bezier curved surface, and Bin(u) is Bernstein""s basic function, i.e.:                                           B            i            n                    ⁡                      (            u            )                          =                                            n              !                                                      i                !                            ⁢                              xe2x80x83                            ⁢                                                (                                      n                    -                    i                                    )                                !                                              ⁢                      u            i                    ⁢                      xe2x80x83                    ⁢                                    (                              1                -                u                            )                                      n              -              1                                                          (        3        )            
Meanwhile, Bin(u) is in form of a binomial coefficient with the relationship:                                           ∑                          i              =              0                        n                    ⁢                      xe2x80x83                    ⁢                                    B              i              n                        ⁡                          (              t              )                                      =                                            {                                                (                                      1                    -                    t                                    )                                +                t                            }                        ⁢                          xe2x80x83                        ⁢                                         n                                =          1                                    (        4        )            
The sum of the product of two Bernstein""s basic functions is 1.                                           ∑                          i              =              0                        n                    ⁢                      xe2x80x83                    ⁢                                    ∑                              j                =                0                            m                        ⁢                          xe2x80x83                        ⁢                                                            B                  i                  n                                ⁡                                  (                  u                  )                                            ⁢                                                B                  j                  m                                ⁡                                  (                  v                  )                                                                    =                                                            {                                                      (                                          1                      -                      u                                        )                                    +                  u                                }                            n                        ⁢                          xe2x80x83                        ⁢                                          {                                                      (                                          1                      -                      v                                        )                                    +                  v                                }                            m                                =          1                                    (        5        )            
In the equation (5), if n=m=3, the following relationship exists for each value of u and v:
xe2x80x83a00+a10+a20+a30+ . . . +a03+a13+a23+a33=1xe2x80x83xe2x80x83(6)
Point vector S(u, v) on a curved surface is given by:
S(u, v)=a00P00+a10P10+ . . . +a23P23+a33P33xe2x80x83xe2x80x83(7)
a00 to a33 are the product of two Bernstein""s functions. FIG. 8 represents Bezier curved surface in this case.
From the equations (6) and (7), a point on the curved surface can be given by barycentric coordinates having weight on each of control points. Thus, it is evident that the shape of Bezier curved surface can be changed within a convex polyhedron including control points by moving each control point vector Pij. The other curved surface such as B-spline surface, NURBS surface, and Gregory surface are given by the function using parameters u and v and control point vector Pij as in the case of Bezier surface. Thus, the shape of curved surface can be changed by control points.
On the other hand, in deforming the shape of a free-form surface, curved surface is not moved in any of expression modes of the above free-form surfaces, and inherent parameters for expressing shape are changed and the shape is indirectly deformed.
In other words, when the shape of the curved surface is deformed, it is not that points of the curved surface are directly manipulated, but control point in neighborhood of the curved surface must be manipulated.
Therefore, it is not possible to freely design a free-form surface unless more experiences are accumulated to be able to estimate how the shap of the curved surface is changed and which of the control points is moved, or how far and which of the control points should be moved in order to deform the curved surface as desired.
Therefore, it is an object of the present invention to provide a method and apparatus which is capable of displaying a three-dimensional free-form surface on a display unit such that a desired curved surface can be obtained irrespective of the complexity of the curved surface by receiving commands from a user.
To attain the above-mentioned object, at least one auxiliary weight function is employed with plural sample points being set. The auxiliary weight function is first inputted by a user and is used to calculate virtual data and main weight function(s). The main weight function(s) is/are calculated using the auxiliary weight function and virtual data. Interpolation values are then calculated to obtain data indicative of a modified curved surface, and this curved surface is displayed. The user may adjust not only sample points but also auxiliary weight function so as to further modify the displayed curved surface. The change in the auxiliary weight function causes the change in virtual data and the main weight function(s). Therefore, the displayed curved surface can be modified at will of the user who continuously gives commands to vary the auxiliary weight function. With this arrangement, even if the sample points are fixed, various different desired curved surfaces can be obtained by changing the auxiliary weight function.
Therefore, according to the present invention, there is provided a method of interactively generating data indicative of a three-dimensional free-form surface and visually displaying the surface by a display unit, comprising the steps of:
a) setting three-dimensional positional data representing sample points on said three-dimensional free-form surface to be generated and at least one auxiliary weight function both in response to commands inputted by a user;
b) calculating virtual data using said three-dimensional positional data and said auxiliary weight function, and calculating at least one main weight function using said auxiliary weight function and said virtual data so that said main weight function equals a value other than zero at one sample point and equals zero at remaining sample points, and;
(c) calculating interpolation values of said free-form surface using said main weight function and said virtual data to obtain data indicative of a modified three-dimensional free-form surface;
(d) displaying said modified three-dimensional free-form surface by said display unit;
(e) adjusting said data representing said sample points in response to commands inputted by said user;
(f) adjusting said auxiliary weight function based on adjusted said data representing said sample points in response to commands inputted by said user; and
repeating steps (b) to (f) as long as said commands are inputted in said step (e) or (f) to obtain a finally modified three-dimensional free-form surface.
There is also provided, according to the present invention, an apparatus for interactively generating data indicative of a three-dimensional free-form surface and visually displaying the surface by a display unit, comprising:
(a) means for setting three-dimensional positional data representing sample points on said three-dimensional free-form surface to be generated and at least one auxiliary weight function both in response to commands inputted by a user; and
(b) means for calculating virtual data using said three-dimensional positioned data and said auxiliary weight function and calculating at least one main weight function using said auxiliary weight function and said virtual data so that said main weight function equals a value other than zero at one of said sampler points and equal zero at remaining sample points, and;
(c) means for calculating interpolation values of said free-form surface using said main weight function and said virtual data to obtain data indicative of a modified three-dimensional free-form surface;
(d) means for displaying said modified three-dimensional free-form surface by said display unit;
(e) means for adjusting said data representing said sample points in response to commands inputted by said user;
(f) means for adjusting said auxiliary weight function based on adjusted said data representing said sample points in response to commands inputted by said user; and
means for repeating said steps (b) to (f) as long as said commands are inputted in said step (e) or (f) to obtain a finally modified three-dimensional free-form surface.